package cn.lili.modules.serviceimpl;

import cn.lili.modules.entity.AppLabel;
import cn.lili.modules.entity.AppUser;
import cn.lili.modules.enums.StatusEnum;
import cn.lili.modules.mapper.AppLabelMapper;
import cn.lili.modules.mapper.AppUserMapper;
import cn.lili.modules.service.AppLabelService;
import cn.lili.modules.service.AppUserService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

import java.util.List;

/**
 * @author:xiangqian
 * @date: 2024/3/8 15:17
 */
@Service
public class AppLabelServiceImpl extends ServiceImpl<AppLabelMapper, AppLabel> implements AppLabelService {

    /**
     * 查询所有频道
     *
     * @return 频道列表
     */
    @Override
    public List<AppLabel> getAll() {
        LambdaQueryWrapper<AppLabel> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(AppLabel::getStatus, StatusEnum.NORMAL.getCode());
        queryWrapper.orderByAsc(AppLabel::getSort);
        return this.baseMapper.selectList(queryWrapper);
    }
}
